let username = document.getElementById("#account");
let password1 = document.getElementById("#pass1");
let password2 = document.getElementById("#pass2");
let team = document.getElementById("#team");
let url = "http://php.yckz003.top/user/authority";
function submit() {
    if (password1.toString().length < 6 || password2.toString().length < 6 || password1 !== password2) {
        alert("password does not match")
    }
    if ((password1.toString().length >= 6) && password1 === password2) {
        // POST: http://ip/user_authority
        let data = {
            "username": username,
            "password": password1,
            "team": team
        }
        $.ajax({
            type: 'POST',
            url: url,
            data: data,
            success: function (res) {
                console.log(res);
            },
            error: function (err) {
                console.log(err.status);
                alert(err);
            }
        });
    }
}
